package Messages;

public class Test {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		try
		{
			Message message = new EntrantDetected("192.168.0.1", "8000", "myqueue");
			String messageString = message.RenderMessage();
			System.out.println(messageString);
			message = Util.GetMessageObject(messageString);
			System.out.println(message.RenderMessage());
			
			message = new AlertCanceled("timeout");
			messageString = message.RenderMessage();
			System.out.println(messageString);
			message = Util.GetMessageObject(messageString);
			System.out.println(message.RenderMessage());
			
			message = new InvalidKey();
			messageString = message.RenderMessage();
			System.out.println(messageString);
			message = Util.GetMessageObject(messageString);
			System.out.println(message.RenderMessage());
			
			
			message = new DoorCommand("lsdfladflafljlsfjlasfd", "accessGranted");
			messageString = message.RenderMessage();
			System.out.println(messageString);
			message = Util.GetMessageObject(messageString);
			System.out.println(message.RenderMessage());
			
			message = new KeyGeneration("sdkfjlsdjfljsdlf");
			messageString = message.RenderMessage();
			System.out.println(messageString);
			message = Util.GetMessageObject(messageString);
			System.out.println(message.RenderMessage());
			
			message = new KeyGenerationResponse("sdkfjlsdjfljsdlf");
			messageString = message.RenderMessage();
			System.out.println(messageString);
			message = Util.GetMessageObject(messageString);
			System.out.println(message.RenderMessage());
			
			message = new C2DMRegistration("APA91bGWI6u9iet6BoSAqKQ5IQVyY5e8Vu5QktIlOqmwfh_YYbPwnMruQPOBXdoRLQzsIrxOgC-DukBJdD4f6MSErXqTPHE0JA");
			messageString = message.RenderMessage();
			System.out.println(messageString);
			message = Util.GetMessageObject(messageString);
			System.out.println(message.RenderMessage());
		}
		catch(InvalidVarListException e)
		{
			System.out.println("fail");
		}
	}

}
